﻿/*  ----------------------------------------------------------------------------
 *  DES-Release 2
 *  ----------------------------------------------------------------------------
 *  File:       ServerTask.cs
 *  Author:     nitinkoshy@gmail.com
 *  Source:     http://des.codeplex.com/
 *  ----------------------------------------------------------------------------
*/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DES.Common;


namespace DES.Server.Common
{
    public class ServerTask
    {
        ClientTask Task
        {
            get;
            set;
        }
        Guid TaskId
        {
            get;
            set;
        }
        Stack<ExecutionServer> ForwardedServerStack
        {
            get;
            set;
        }
        int HoppedCount
        {
            get
            {
                return ForwardedServerStack.Count;
            }
        }

        bool HasBeenForwarded
        {
            get
            {
                return ForwardedServerStack.Count > 1;//the first one being the default/first serverS
            }
        }
    }
}
